From e25731656094308acae398f74d43c14f7b5e7218 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 18 Mar 1993 23:06:04 +0000 Subject: [PATCH] * make-dist: Use gzip, if we can find it. --- make-dist | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/make-dist b/make-dist index 41631f2f5e6..e7a00cd9a5f 100755 --- a/make-dist +++ b/make-dist @@ -253,8 +253,22 @@ if [ "${newer}" ]; then fi if [ "${make_tar}" = yes ]; then + echo "Looking for gzip." + temppath=`echo $PATH | sed 's/^:/.:/ + s/::/:.:/g + s/:$/:./ + s/:/ /g'` + default_compress=`( + for dir in ${temppath}; do + if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi + done + echo compress + )` echo "Creating tar file." - (cd ${tempparent}; tar cvf - ${emacsname}) | compress > ${emacsname}.tar.Z + (cd ${tempparent} + tar cvf - ${emacsname}) \ + | ${default_compress} > ${emacsname}.tar.Z + ) fi if [ "${clean_up}" = yes ]; then -- 2.30.2